/* Swagger UI 自定义样式 */
.swagger-ui-wrapper {
  /* 隐藏顶部的信息栏，因为我们已经在上层显示了 */
  .swagger-ui .info {
    display: none;
  }

  /* 完全隐藏服务器选择器的容器样式 */
  .swagger-ui .scheme-container {
    padding: 0;
    background: transparent;
    border: none;
    margin-bottom: 16px;
    position: relative;
    box-shadow: none;
  }

  /* 隐藏服务器区域的所有边框和背景 */
  .swagger-ui .scheme-container > div {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }

  /* 服务器URL样式优化 */
  .swagger-ui .servers-title {
    font-weight: 600;
    margin-bottom: 8px;
    color: #262626;
  }

  .swagger-ui .servers select {
    font-family: Monaco, Consolas, monospace;
    background: white;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 8px 40px 8px 12px;
    font-size: 14px;
    color: #1890ff;
    cursor: pointer;
    min-width: 300px;
    position: relative;
  }

  .swagger-ui .servers select:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
  }

  /* 服务器选择器容器 */
  .swagger-ui .servers {
    position: relative;
  }

  /* 调整操作项的样式 */
  .swagger-ui .opblock {
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    margin-bottom: 8px;
    box-shadow: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .swagger-ui .opblock.opblock-get {
    border-color: #61affe;
    background: rgba(97, 175, 254, 0.03);
  }

  .swagger-ui .opblock.opblock-post {
    border-color: #49cc90;
    background: rgba(73, 204, 144, 0.03);
  }

  .swagger-ui .opblock.opblock-put {
    border-color: #fca130;
    background: rgba(252, 161, 48, 0.03);
  }

  .swagger-ui .opblock.opblock-delete {
    border-color: #f93e3e;
    background: rgba(249, 62, 62, 0.03);
  }

  .swagger-ui .opblock.opblock-patch {
    border-color: #50e3c2;
    background: rgba(80, 227, 194, 0.03);
  }

  /* 调整展开的操作项样式 */
  .swagger-ui .opblock.is-open {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* 调整参数表格样式 */
  .swagger-ui .parameters-container {
    background: transparent;
  }

  .swagger-ui .parameter__name {
    font-family: Monaco, Consolas, monospace;
    font-weight: 600;
  }

  /* 调整响应区域样式 */
  .swagger-ui .responses-wrapper {
    background: transparent;
  }

  /* 调整Try it out按钮 */
  .swagger-ui .btn.try-out__btn {
    background: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 14px;
  }

  .swagger-ui .btn.try-out__btn:hover {
    background: #40a9ff;
  }

  /* 调整Execute按钮 */
  .swagger-ui .btn.execute {
    background: #52c41a;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
  }

  .swagger-ui .btn.execute:hover {
    background: #73d13d;
  }

  /* 调整Clear按钮 */
  .swagger-ui .btn.btn-clear {
    background: #ff4d4f;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 16px;
    font-size: 14px;
  }

  .swagger-ui .btn.btn-clear:hover {
    background: #ff7875;
  }

  /* 调整模型区域 */
  .swagger-ui .model-container {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
  }

  /* 调整代码高亮 */
  .swagger-ui .highlight-code {
    background: #2d3748;
    border-radius: 4px;
  }

  /* 调整输入框样式 */
  .swagger-ui input[type=text],
  .swagger-ui input[type=password],
  .swagger-ui input[type=search],
  .swagger-ui input[type=email],
  .swagger-ui input[type=url],
  .swagger-ui input[type=number] {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 6px 11px;
    font-size: 14px;
    line-height: 1.5;
  }

  .swagger-ui input[type=text]:focus,
  .swagger-ui input[type=password]:focus,
  .swagger-ui input[type=search]:focus,
  .swagger-ui input[type=email]:focus,
  .swagger-ui input[type=url]:focus,
  .swagger-ui input[type=number]:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
  }

  /* 调整文本域样式 */
  .swagger-ui textarea {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 6px 11px;
    font-size: 14px;
    line-height: 1.5;
  }

  .swagger-ui textarea:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
  }

  /* 调整下拉选择样式 */
  .swagger-ui select {
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    padding: 6px 11px;
    font-size: 14px;
    line-height: 1.5;
  }

  .swagger-ui select:focus {
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
    outline: none;
  }

  /* 隐藏授权部分（如果不需要） */
  .swagger-ui .auth-wrapper {
    display: none;
  }

  /* 调整整体字体 */
  .swagger-ui {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  }


  /* 调整标题样式 */
  .swagger-ui .opblock-summary-description {
    font-size: 14px;
    color: #666;
  }

  /* 调整HTTP方法标签 */
  .swagger-ui .opblock-summary-method {
    font-weight: bold;
    text-transform: uppercase;
    border-radius: 3px;
    padding: 6px 12px;
    font-size: 12px;
    min-width: 60px;
    text-align: center;
  }

  /* 调整路径显示 */
  .swagger-ui .opblock-summary-path {
    font-family: Monaco, Consolas, monospace;
    font-size: 16px;
    font-weight: 500;
  }

  /* 移除不必要的边距 */
  .swagger-ui .swagger-container {
    max-width: none !important;
    width: 100% !important;
    padding: 0;
    margin: 0;
  }

  /* 调整顶层wrapper */
  .swagger-ui .wrapper {
    padding: 0;
    margin: 0;
    width: 100% !important;
    max-width: none !important;
  }

  /* 移除左侧空白 */
  .swagger-ui .information-container {
    margin: 0;
    padding: 0;
  }

  /* 移除整体左边距 */
  .swagger-ui {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }

  /* 移除操作块的左边距 */
  .swagger-ui .opblock-tag-section {
    margin-left: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
  }

  /* 确保接口标签区域占满宽度 */
  .swagger-ui .opblock-tag {
    width: 100%;
    margin: 0;
  }

  /* 强制所有Swagger UI容器占满宽度 */
  .swagger-ui-wrapper {
    width: 100% !important;
  }

  .swagger-ui {
    width: 100% !important;
    max-width: none !important;
  }

  .swagger-ui .info {
    width: 100% !important;
  }

  .swagger-ui .scheme-container {
    width: 100% !important;
    max-width: none !important;
  }

  /* 强制内容区域占满宽度 */
  .swagger-ui .swagger-container .wrapper {
    width: 100% !important;
    max-width: none !important;
  }

  /* 强制操作列表容器占满宽度 */
  .swagger-ui .swagger-container .wrapper .col-12 {
    width: 100% !important;
    max-width: none !important;
    flex: 0 0 100% !important;
  }

  /* Servers标题样式 */
  .swagger-ui .servers-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    color: #262626 !important;
    text-align: left !important;
  }

  /* 接口列表标题样式 */
  .swagger-ui .opblock-tag {
    font-size: 16px !important;
    font-weight: 500 !important;
    text-align: left !important;
    margin-left: 0 !important;
  }

  /* 去掉复制按钮的边框 */
  .copy-server-btn {
    border: none !important;
    background: transparent !important;
    padding: 6px 8px !important;
    color: #666 !important;
    transition: all 0.2s !important;
  }

  .copy-server-btn:hover {
    background: #f5f5f5 !important;
    color: #1890ff !important;
  }

  /* 调整接口列表与上方分割线的距离 */
  .swagger-ui .opblock-tag-section {
    margin-top: 20px !important;
  }

  /* 调整分割线样式，确保与接口边框分开 */
  .swagger-ui .opblock-tag h3 {
    margin-bottom: 20px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #e8e8e8 !important;
  }

  /* 确保第一个接口容器与分割线有足够间距 */
  .swagger-ui .opblock-tag-section .opblock:first-child {
    margin-top: 16px !important;
  }
}
